<template>
	<view :class="[isAcitve ? 'active' : '']" :style="{border:'1px solid #000'}"></view>
	<button @click="addStyle">点击添加样式</button>
</template>
 
<script setup lang="ts">
import { ref } from 'vue';
	const isAcitve = ref(false)
	const addStyle =()=>{
		isAcitve.value = !isAcitve.value
	}
</script>

<style scoped lang="scss">
	.active{
		width: 100px;
		height: 100px;
		background-color: orange;
	}
	button{
		// position: absolute;
		position: absolute;
		top:100px;
		// margin-top: 100px;
	}
</style>
